package net.hn.hnms.biz.energy.group.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.hn.hnms.biz.energy.group.service.EnergyGroupService;
import net.hn.hnms.biz.energy.request.GroupCommonReq;
import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.biz.energy.vo.*;
import net.hn.hnms.biz.energy.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/GroupEnergy")
@Api(value = "集团能耗统计",tags = {"集团能耗统计"})
public class EnergyGroupController {

    @Autowired
    private EnergyGroupService energyGroupService;


//    @RequestMapping(value = "/getWaterSupplyUnitCount", method = RequestMethod.GET)
//    @ApiOperation("供水单位统计")
//    public R<WaterSupplyGroupVo> getWaterSupplyUnitCount(GroupCommonReq req) {
//        return R.ok(energyGroupService.getWaterSupplyUnitCount(req));
//    }
//
//
//    @RequestMapping(value = "/getUnitPriceOfWater", method = RequestMethod.GET)
//    @ApiOperation("用水单价统计")
//    public R<WaterPlacePriceGroupVo> getUnitPriceOfWater(GroupCommonReq req) {
//        return R.ok(energyGroupService.getUnitPriceOfWater(req));
//    }
//
//
//    @RequestMapping(value = "/getWaterSettlement", method = RequestMethod.GET)
//    @ApiOperation("用水结算统计")
//    public R<WaterSettlementGroupVo> getWaterSettlement(GroupCommonReq req) {
//        return R.ok(energyGroupService.getWaterSettlement(req));
//    }


    @RequestMapping(value = "/getNewWaterSupplyUnitCount", method = RequestMethod.GET)
    @ApiOperation("供水单位统计")
    public R<List<WaterSupplyGroupVo>> getNewWaterSupplyUnitCount(GroupCommonReq req) {
        return R.ok(energyGroupService.getNewWaterSupplyUnitCount(req));
    }

    @RequestMapping(value = "/getNewUnitPriceOfWater", method = RequestMethod.GET)
    @ApiOperation("用水单价统计")
    public R<List<WaterPlacePriceGroupVo>> getNewUnitPriceOfWater(GroupCommonReq req) {
        return R.ok(energyGroupService.getNewUnitPriceOfWater(req));
    }

    @RequestMapping(value = "/getNewWaterSettlement", method = RequestMethod.GET)
    @ApiOperation("用水结算统计")
    public R<List<WaterSettlementGroupVo>> getNewWaterSettlement(GroupCommonReq req) {
        return R.ok(energyGroupService.getNewWaterSettlement(req));
    }

    @RequestMapping(value = "/getNewWaterAccount", method = RequestMethod.GET)
    @ApiOperation("用水台账统计")
    public R<List<WaterRecordGroupVo>> getNewWaterAccount(GroupCommonReq req) {
        return R.ok(energyGroupService.getNewWaterAccount(req));
    }

    @RequestMapping(value = "/getPowerLoad", method = RequestMethod.GET)
    @ApiOperation("电负荷统计")
    public R<List<ElectricityPlacePriceVo>> getPowerLoad(GroupCommonReq req) {
        return R.ok(energyGroupService.getPowerLoad(req));
    }

    @RequestMapping(value = "/getElectricityConsumptionStatistics", method = RequestMethod.GET)
    @ApiOperation("用电统计")
    public R<List<ElectricitySettlementGroupVo>> getElectricityConsumptionStatistics(GroupCommonReq req) {
        return R.ok(energyGroupService.getElectricityConsumptionStatistics(req));
    }
}
